<!doctype html><html lang="zh-Hans-CN"><head><meta charset="UTF-8"><title>innerText、innerHTML举例</title><script>function textGet(){let oDiv = document.getElementById("oDiv");let msg = "通过innerText属性获得：";msg+=oDiv.innerText;msg+="\n通过innerHTML属性获得： "msg+=oDiv.innerHTML;alert(msg);}</script></head><body onload="textGet()"><div id="oDiv" ><strong>web前端开发技术，不错！</strong></div>	<hr>	<p> <script>document.write(document.lastModified);</script> <a href="index.html">返回本章目录</a></p></body></html>